package com.bwie.controller;

import com.bwie.common.domain.User;
import com.bwie.common.result.Result;
import com.bwie.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @className: UserController
 * @Description: TODO
 * @version: v1.８.0
 * @author: 李明
 * @date: 2025/11/10 9:57
 */
@RestController
@RequestMapping("user")
@CrossOrigin
public class UserController {

    @Autowired
    private UserService userService;

    /**
     * 通过账号获取用户信息
     */
    @GetMapping("getUserInfo/{account}")
    public Result<User> getUserInfo(@PathVariable("account") String account){
        User user = userService.getUserInfo(account);
        return Result.success(user);
    }

}
